<%--
  Created by IntelliJ IDEA.
  User: han tao
  Date: 2023/4/19
  Time: 20:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>奶茶展示</title>
</head>
<body>
<table border="1" class="table table-bordered table-hover">
    <tr class="success">
        <th>id</th>
        <th>奶茶</th>
        <th>价格</th>
        <th>种类</th>
        <th>图片</th>
        <th>操作</th>
    </tr>
    <c:forEach var="milkTea" items="${list}">
        <tr>
            <td>${milkTea.tid}</td>
            <td>${milkTea.tname}</td>
            <td>${milkTea.price}</td>
            <td>${milkTea.genre}</td>
            <td><img src="/${milkTea.img_path}"  style="height: 75px"></td>
            <td>
                <a class="btn btn-default btn-sm" href="/admin?action=findTeaByTid&tid=${milkTea.tid}">修改</a>&nbsp;
                <a class="btn btn-default btn-sm" href="/admin?action=deleteTea&tid=${milkTea.tid}" onclick="return confirm('您确认删除吗?') ">删除</a>
            </td>
        </tr>
    </c:forEach>
        <tr>
            <td colspan="6" align="left"><a class="btn btn-primary" href="/pages/admin/tea/addTea.jsp">添加奶茶</a></td>
        </tr>
</table>
</body>
</html>
